<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="<%=request.getContextPath()%>/Food/addgo1">新增</a>
<a href="<%=request.getContextPath()%>/Food/selectAll">查询</a>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <td>菜品编号</td>
        <td>菜品姓名</td>
        <td>开始时间</td>
        <td>结束时间</td>
        <td>操作</td>
    </tr>
    <c:forEach var="item" items="${foods}">
        <tr>
            <td>${item.dishNumber}</td>
            <td>${item.designatio}</td>
            <td><fmt:formatDate value="${item.startTime}" pattern="yyyy-MM-dd "></fmt:formatDate></td>
            <td><fmt:formatDate value="${item.endTime}" pattern="yyyy-MM-dd "></fmt:formatDate></td>
            <td>
                <a href="<%=request.getContextPath()%>/Food/editgo?id=${item.dishNumber}">修改</a>
                <a href="<%=request.getContextPath()%>/Food/delete?id=${item.dishNumber}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
